extends Node


var cloudmaking = false
var player_ani = "normal"

var l1_biult = false
var l2_biult = false
var l3_biult = false
var l4_powerplace = false
var l4_biult = false


var l5_repaired = false
var l5_rope = false
var l5_powered = false
var l5_pao = false

var fly = false
var home = false

var over = false

var ingredients = []
var player_bag = {}



'''

["inputs","outputs","outamount"]
	:"item"
	'''
	
var recipes={

	["stone","stone"]:["sharp_stone"],
	
	["stick","stone"]:["stupid_axe"],
	["stupid_axe"]:["stick","stone"],
	
	["sharp_stone","stick"]:["sharp_axe"],
	
	["stone","stupid_axe"]:["sharp_axe"],
	
	["sharp_axe"]:["sharp_stone","stick"],
	
	["wood","wood","wood"]:["wooden"],
	["wooden"]:["wood","wood","wood"],
	
	["bamboo","bamboo","bamboo"]:["bambooen"],
	["bambooen"]:["bamboo","bamboo","bamboo"],
	
	["leaf"]:["fiber"],
	["fiber","fiber"]:["rope"],
	["rope"]:["fiber","fiber"],
	["bambooen","rope"]:["bambooen_fixed"],
	["bambooen_fixed"]:["bambooen","rope"],
	
	["sand","water"]:["wetsand"],
	["wetsand"]:["sand","water"],
	["fire","wetsand"]:["sand"],
	
	
	["fire","sand"]:["glass"],
	["fire","glass"]:["empbottle"],
	["empbottle","fire"]:["glass"],
	["fire","water"]:["steam"],
	
	["empbottle","water"]:["watbottle"],
	["watbottle"]:["empbottle","water"],
	["empbottle","steam"]:["stebottle"],
	["stebottle"]:["empbottle","steam"],
	["fire","watbottle"]:["stebottle"],
	
	["energy_stone","fire"]:["sti_energy_stone"],
	
	["big_leaf","big_leaf","big_leaf"]:["fan"],
	["fan","stick"]:["holdfan"],
	["holdfan"]:["fan","stick"],
	["holdfan","sti_energy_stone"]:["sti_holdfan"],
	["sti_holdfan"]:["holdfan","sti_energy_stone"],
	
	["empbottle","holdfan"]:["emp_holdfan"],
	["emp_holdfan"]:["empbottle","holdfan"],
	["holdfan","watbottle"]:["wat_holdfan"],
	["wat_holdfan"]:["holdfan","watbottle"],
	["holdfan","stebottle"]:["ste_holdfan"],
	["ste_holdfan"]:["holdfan","stebottle"],
	
	["emp_holdfan","water"]:["wat_holdfan"],
	["fire","wat_holdfan"]:["ste_holdfan"],
	["emp_holdfan","steam"]:["ste_holdfan"],
	
	["emp_holdfan","sti_energy_stone"]:["sti_emp_holdfan"],
	["empbottle","sti_holdfan"]:["sti_emp_holdfan"],
	["sti_emp_holdfan","water"]:["sti_wat_holdfan"],
	["sti_holdfan","watbottle"]:["sti_wat_holdfan"],
	["steam","sti_emp_holdfan"]:["sti_ste_holdfan"],
	["stebottle","sti_holdfan"]:["sti_ste_holdfan"],
	["sti_emp_holdfan"]:["emp_holdfan","sti_energy_stone"],
	
	["sti_energy_stone","wat_holdfan"]:["sti_wat_holdfan"],
	["sti_wat_holdfan"]:["sti_energy_stone","wat_holdfan"],
	
	["fire","sti_wat_holdfan"]:["sti_ste_holdfan"],
	["ste_holdfan","sti_energy_stone"]:["sti_ste_holdfan"],
	["sti_ste_holdfan"]:["ste_holdfan","sti_energy_stone"],
	
	["fire","wood"]:["carbon"],
	["carbon","sulfur"]:["weak_power"],
	["sti_energy_stone","weak_power"]:["strong_power"],
	
	["fire","steel"]:["iron"],
	
	["self"]:["home"]
	



}



var dict = {
	
	"stone":"石头",
	"sharp_stone":"打磨过的石头",
	"stick":"树枝",
	"stupid_axe":"钝斧头",
	"sharp_axe":"锋利的斧头",
	"wood":"木头",
	"wooden":"木材",
	
	"bamboo":"竹子",
	"bambooen":"竹材",
	"leaf":"叶子",
	"fiber":"纤维",
	"rope":"线",
	"bambooen_fixed":"加固的竹材",
	
	"sand":"沙子",
	"glass":"玻璃",
	"empbottle":"空瓶子",
	"watbottle":"水瓶",
	"stebottle":"蒸汽瓶",
	
	"fire":"火",
	"water":"水",
	"steam":"蒸汽",
	
	"energy_stone":"能量石（未激活）",
	"sti_energy_stone":"能量石（激活）",
	"wetsand":"湿哒哒的沙子",
	
	"big_leaf":"很大的叶子",
	"fan":"扇叶",
	"holdfan":"风扇（未激活）",
	"sti_holdfan":"风扇（激活）",
	"emp_holdfan":"加装空瓶的风扇（未激活）",
	"sti_emp_holdfan":"加装空瓶的风扇（激活）",
	"ste_holdfan":"简易造云机（未激活）",
	"sti_ste_holdfan":"简易造云机（激活）",
	"wat_holdfan":"简易造雾机（未激活）",
	"sti_wat_holdfan":"简易造雾机（激活）",
	
	"sulfur":"硫磺",
	"carbon":"炭",
	"weak_power":"弱火药",
	"strong_power":"强火药",
	
	"steel":"生铁",
	"iron":"铁",
	
	"self":"你自己",
	"home":"精神坐标"
	
	
	
	
	
	
}




func add_item(item_type:String):    #更新库存
	var current_amount = player_bag.get(str(item_type),0)
	SeManager.play_pick_up()
	if current_amount>0:
		player_bag[item_type]+=1
	else:
		player_bag[item_type]=1


var current_item = "item0"
var current_grid = "item0"

	
var move_allow=true
